package com.zheng.umbrella.dao.model;

import java.io.Serializable;
import java.util.Date;

public class UmbrellaHardwareMachineVersionDetails implements Serializable {
    private Integer id;

    /**
     * 机器码
     *
     * @mbg.generated
     */
    private String machineCode;

    /**
     * 1 升级STM32主机；2 升级蓝牙主机；3 升级蓝牙从机；
     *
     * @mbg.generated
     */
    private Integer target;

    /**
     * 固件文件路径
     *
     * @mbg.generated
     */
    private String filepath;

    /**
     * 软件版本
     *
     * @mbg.generated
     */
    private String version;

    /**
     * 指定需要升级的从机序号
     *
     * @mbg.generated
     */
    private String slaveIndexes;

    /**
     * 0:待升级 1:已发送 2:升级成功 3:升级失败
     *
     * @mbg.generated
     */
    private Integer status;

    /**
     * 升级结果附加信息
     *
     * @mbg.generated
     */
    private String resultinfo;

    private Date createtime;

    private Date updatetime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public Integer getTarget() {
        return target;
    }

    public void setTarget(Integer target) {
        this.target = target;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getSlaveIndexes() {
        return slaveIndexes;
    }

    public void setSlaveIndexes(String slaveIndexes) {
        this.slaveIndexes = slaveIndexes;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getResultinfo() {
        return resultinfo;
    }

    public void setResultinfo(String resultinfo) {
        this.resultinfo = resultinfo;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", machineCode=").append(machineCode);
        sb.append(", target=").append(target);
        sb.append(", filepath=").append(filepath);
        sb.append(", version=").append(version);
        sb.append(", slaveIndexes=").append(slaveIndexes);
        sb.append(", status=").append(status);
        sb.append(", resultinfo=").append(resultinfo);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmbrellaHardwareMachineVersionDetails other = (UmbrellaHardwareMachineVersionDetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMachineCode() == null ? other.getMachineCode() == null : this.getMachineCode().equals(other.getMachineCode()))
            && (this.getTarget() == null ? other.getTarget() == null : this.getTarget().equals(other.getTarget()))
            && (this.getFilepath() == null ? other.getFilepath() == null : this.getFilepath().equals(other.getFilepath()))
            && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
            && (this.getSlaveIndexes() == null ? other.getSlaveIndexes() == null : this.getSlaveIndexes().equals(other.getSlaveIndexes()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getResultinfo() == null ? other.getResultinfo() == null : this.getResultinfo().equals(other.getResultinfo()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMachineCode() == null) ? 0 : getMachineCode().hashCode());
        result = prime * result + ((getTarget() == null) ? 0 : getTarget().hashCode());
        result = prime * result + ((getFilepath() == null) ? 0 : getFilepath().hashCode());
        result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
        result = prime * result + ((getSlaveIndexes() == null) ? 0 : getSlaveIndexes().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getResultinfo() == null) ? 0 : getResultinfo().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        return result;
    }
}